package com.sq.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.sq.util.exception.VisualException;

/**
 * @author sq
 *
 */
public class Demo {

    private static Logger log = LoggerFactory.getLogger(Demo.class);

    public static void main(String[] args) {
        log.info("test");
        long start = System.currentTimeMillis();
        int num = 100000000;
        for (int i = 0; i < num; i++) {
            DateUtil.getTime(DateUtil.getTimeString(i));
        }
        long end = System.currentTimeMillis();
        System.out.println(end - start);
        System.out.println(num * 1000L / (end - start));
    }

    public static void main2(String[] args) {
        for (int i = 0; i < 1000000; i++) {
            VisualException.isTrue(a() == b(), "");
        }
        System.out.println("over");
    }

    private static int b() {
        return 10000 & 31;
    }

    private static int a() {
        return 10000 % 32;
    }

}
